﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class RptvtasFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As RptvtasBE
        Dim tmpRptvtas As RptvtasBE = New RptvtasBE()
        Try
            With tmpRptvtas
                .Al = convertDTFromDb.convertDateTime(dr.Item("Al"))
                .Art = convertDTFromDb.convertInt32(dr.Item("Art"))
                .ArtXC = convertDTFromDb.ConvertDecimal(dr.Item("ArtXC"))
                .Cancela = convertDTFromDb.ConvertDecimal(dr.Item("Cancela"))
                .Ctes = convertDTFromDb.convertInt32(dr.Item("Ctes"))
                .Del = convertDTFromDb.convertDateTime(dr.Item("Del"))
                .Descu = convertDTFromDb.ConvertDecimal(dr.Item("Descu"))
                .Devo = convertDTFromDb.ConvertDecimal(dr.Item("Devo"))
                .Efectivo = convertDTFromDb.ConvertDecimal(dr.Item("Efectivo"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Impuesto = convertDTFromDb.ConvertDecimal(dr.Item("Impuesto"))
                .ME_ = convertDTFromDb.ConvertDecimal(dr.Item("ME"))
                .SubT = convertDTFromDb.ConvertDecimal(dr.Item("SubT"))
                .Suma = convertDTFromDb.ConvertDecimal(dr.Item("Suma"))
                .TC = convertDTFromDb.ConvertDecimal(dr.Item("TC"))
                .TD = convertDTFromDb.ConvertDecimal(dr.Item("TD"))
                .TotalB = convertDTFromDb.ConvertDecimal(dr.Item("TotalB"))
                .TotalN = convertDTFromDb.ConvertDecimal(dr.Item("TotalN"))
                .Transacc = convertDTFromDb.ConvertDecimal(dr.Item("Transacc"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
            End With
            Return tmpRptvtas
        Catch ex As Exception
            Throw
        Finally
            tmpRptvtas = Nothing
        End Try
    End Function
End Class
